package com.gitee.huxing.course.domain.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gitee.huxing.course.domain.mapper.PlatFormOrderMapper;
import com.gitee.huxing.course.domain.module.PlatFormOrderDO;
import com.gitee.huxing.course.domain.service.OrderService;
import org.springframework.stereotype.Service;

/**
 * @Description:
 * @ProjectName: JavaCourse
 * @Package: com.gitee.huxing.course.domain.service.impl
 * @ClassName: OrderServiceImpl
 * @Author: huxing
 * @DateTime: 2021-10-18 下午6:13
 */
@Service
public class OrderServiceImpl extends ServiceImpl<PlatFormOrderMapper, PlatFormOrderDO>
        implements OrderService {

    @Override
    public PlatFormOrderDO insert(PlatFormOrderDO orderDO) throws RuntimeException {
        this.baseMapper.insert(orderDO);
        return orderDO;
    }

    @Override
    public PlatFormOrderDO update(PlatFormOrderDO orderDO) throws RuntimeException {
        this.baseMapper.update(orderDO);
        return orderDO;
    }

    @Override
    public int delete(String orderId) throws RuntimeException {
        return this.baseMapper.delete(orderId);
    }

    @Override
    public PlatFormOrderDO getOrderById(String orderId) throws RuntimeException {
        return this.baseMapper.selectInfoById(orderId);
    }
}
